package com.ber.rocketmq.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.Date;

/**
 * @Description
 * @Author bai57
 * @Date 2021-07-19
 */

@Setter
@Getter
@ToString
@Entity
@Table(name = "msg")
public class Msg implements Serializable {

    private static final long serialVersionUID = 674557734085704291L;

    @Id
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    @Column(name = "msg_id")
    private String msgId;

    /**
     * 队列id
     */
    @Column(name = "queue_id")
    private Long queueId;

    /**
     * 消息位置
     */
    @Column(name = "queue_offset")
    private Long queueOffset;

    /**
     * 消息体
     */
    @Column(name = "body")
    private String body;

    @Column(name = "create_time")
    private Date createTime;

    @Column(name = "update_time")
    private Date updateTime;

}
